package love.bot.forli.group.review.service.impl;

import love.bot.forli.group.review.bean.GroupMember;
import love.bot.forli.group.review.service.GroupService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * {@link love.bot.forli.group.review.service.GroupService} 的临时伪实现。
 *
 * @author ForteScarlet
 */
@Service
public class GroupServiceImpl implements GroupService {
    private static final GroupMember[] members = new GroupMember[]{
            new GroupMember("1149159218", "法欧特斯卡雷特", "管理员"),
            new GroupMember("1145141919", "张三", "你群张三")
    };


    @Override
    public List<GroupMember> getMembers(String group, Integer offset, Integer limit) {
        return new ArrayList<>(Arrays.asList(members));
    }

    @Override
    public Long memberTotal(String group) {
        return (long) members.length;
    }
}
